<template>
  <div>
    <div class="hot">
      <div class="up">
        <span class="word">影院热映</span>
        <router-link to="/more">
          <span class="word2">更多></span>
        </router-link>
      </div>
      <ul>
        <li v-for="item in movieData" :key="item.id">
          <img :src="src" alt="" />
          <div class="word3">{{ item.title }}</div>
        </li>
      </ul>
      <div class="box"></div>
      <div class="box"></div>
      <div class="box"></div>
      <div class="box"></div>
      <div class="box"></div>

    </div>
  </div>
</template>

<script>
import movieData from '../../assets/data/now_hot_movie.json'
export default {
  data () {
    return {
      movieData: movieData.subjects,
      src: require('../../assets/logo.png')
    }
  },
  methods: {
  }
}
console.log(movieData.subjects)

</script>

<style scoped lang="scss">
.hot {
  width: 100%;
  height: 500px;
  margin-top: 20px;
  .up {
    width: 100%;
    height: 100px;
    border-bottom: 1px solid grey;
    border-top: 1px solid grey;

    .word {
      line-height: 100px;
      text-align: left;
      margin-left: 100px;
    }
    .word2 {
      line-height: 100px;
      text-align: left;
      margin-left: 100px;
      color: green;
      font-size: 40px;
    }
  }
}
ul {
  width: 750px;
  height: 400px;
  padding-top: 20px;
  box-sizing: border-box;
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 1px solid grey;

  li {
    width: 200px;
    height: 350px;
    margin-left: 10px;
    display: inline-block;
    overflow: hidden;
    img {
      width: 200px;
      height: 300px;
    }
    .word3 {
      font-size: 30px;
      text-align: center;
    }
  }
}
.box{
  width: 100%;
  height: 200px;
  background-color: aqua;;
  margin-top: 20px;;
}
</style>
